<?xml version="1.0" encoding="gb2312"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
  <xsl:output method="text" />
  <xsl:template match="/entity"><![CDATA[<columnset>]]><xsl:for-each select="form/data"><xsl:variable name="fieldName" select="@name" /><xsl:for-each select="/entity/metadata/fields/field[@name = $fieldName]/attributes/attribute[@objecttypecode != 0]"><![CDATA[<column>]]><xsl:value-of select="@name" /><![CDATA[</column>]]></xsl:for-each></xsl:for-each><xsl:for-each select="form/tabs/tab/sections/section/rows/row/cell"><xsl:variable name="fieldName" select="@name" /><xsl:for-each select="/entity/metadata/fields/field[@name = $fieldName]/attributes/attribute"><![CDATA[<column>]]><xsl:value-of select="@name" /><![CDATA[</column>]]></xsl:for-each></xsl:for-each><![CDATA[</columnset>]]></xsl:template>
</xsl:stylesheet>